package router

import (
	"github.com/gin-gonic/gin"
	"seat-service/api"
)

var availableTimeApi api.AvailableApi

type AvailableTimeRouter struct {
}

func (*AvailableTimeRouter) availableTimeGroup(router *gin.RouterGroup) *gin.RouterGroup {
	available := router.Group("available")
	{
		available.GET("all", availableTimeApi.All) // 获取预约所有可选时间段
	}
	return available
}

func (*AvailableTimeRouter) availableTimeAdminGroup(router *gin.RouterGroup) *gin.RouterGroup {
	available := router.Group("available")
	{
		available.POST("save", availableTimeApi.Save) // 管理员添加预约可选时间段
	}
	return available
}
